package com.zx.tfw.entity;

/**
 * 自定义响应结构
 */
public class ResponseData {

    /** 响应业务状态 */
    private Integer status;

    /** 响应消息 */
    private String msg;

    /** 响应中的数据 */
    private Object data;

    public static ResponseData build(Integer status, String msg, Object data) {
        return new ResponseData(status, msg, data);
    }
    
    public static ResponseData success(Object data) {
    	return new ResponseData(200, "success", data);
    }
    
    public static ResponseData failed(Object data) {
    	return new ResponseData(400, "failed", data);
    }
    
    public ResponseData() {	}

    public ResponseData(Integer status, String msg, Object data) {
		this.status = status;
		this.msg = msg;
		this.data = data;
	}

	public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }


}
